<?php
// +----------------------------------------------------------------------
// | saiadmin [ saiadmin快速开发框架 ]
// +----------------------------------------------------------------------
// | Author: your name
// +----------------------------------------------------------------------
namespace app\hiadmin\validate;

use think\Validate;

/**
 * 团队管理验证器
 */
class TeamValidate extends Validate
{
    /**
     * 定义验证规则
     */
    protected $rule =   [
        'team_name' => 'require',
        'contact_person' => 'require',
        'phone_num' => 'require',
        'status' => 'require',
        'account_num' => 'require',
        'express_check_num' => 'require',
    ];

    /**
     * 定义错误信息
     */
    protected $message  =   [
        'team_name' => '团队名称必须填写',
        'contact_person' => '联系人必须填写',
        'phone_num' => '手机号必须填写',
        'status' => '状态必须填写',
        'account_num' => '账号额度必须填写',
        'express_check_num' => '快递可查询次数必须填写'
    ];

    /**
     * 定义场景
     */
    protected $scene = [
        'save' => [
            'team_name',
            'contact_person',
            'phone_num',
            'status',
            'account_num',
            'express_check_num',
            'remark',
        ],
        'update' => [
            'team_name',
            'contact_person',
            'phone_num',
            'status',
            'account_num',
            'express_check_num',
            'remark',
        ],
    ];

}
